<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<!-- BEGIN HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN CONTAINER -->
	<!-- BEGIN CONTENT -->
		<!--表格操作按钮组-->
		<div>
			<a class="btn blue" href="javascript:;"  data-target="#costServiceMerchantModel" 
				data-toggle="modal" ng-click="addCostServiceMerchant();">
				<i class="fa fa-plus"></i>
					新增
			</a>
		</div>
			<table class="table table-striped table-bordered table-hover" id="table_1">
			<thead>
				<tr>
					<th>代收成本服务</th>
					<th>合作商</th>
					<th>是否使用</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr class="odd gradeX" ng-repeat="costServiceMerchant in costServiceMerchantList  track by $index" on-loaded="{{$last}}" target-table="table_1">
					<td>
						<span ng-bind="costServiceMerchant.serviceNo | getValueInArgFilter : costServiceMap : 'name'"></span>
					</td>
					<td>
						<span ng-bind="costServiceMerchant.merchantCode | getValueInArgFilter : merchantMap : 'name'"></span>
					</td>
					<td>
						<span ng-bind="costServiceMerchant.isValid | getValueInStaticFilter : 'validArray'"></span>
					</td>
					<td>
						<a class="btn" href="javascript:;"  data-target="#costServiceMerchantModel" 
						data-toggle="modal" ng-click="updateCostServiceMerchant(costServiceMerchant);">
							修改
						</a>
					</td>
				</tr>
			</tbody>
			</table>
		
		<div id="costServiceMerchantModel" class="modal fade" role="dialog"
		aria-hidden="true" data-backdrop="false">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">×</button>
					<h4 class="modal-title">代收成本服务对应的虚拟运营新增/修改</h4>
				</div>
				<div class="modal-body form">
					<div class="form-group">
						<div class="row">
							<label class="col-sm-3 control-label text-right">代收成本服务</label>
							<div class="col-sm-8">
								<div class="input-group">
									<select class="form-control bValidate" key="required" ng-disabled="modifyType=='update'"
										ng-options="service.serviceNo as service.name for service in costServiceMap"
										ng-model="selectedCostServiceMerchant.serviceNo">
										<option value="">请选择订单服务</option>
									</select>
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-3 control-label text-right">虚拟合作商</label>
							<div class="col-sm-8">
								<div class="input-group">
									<select class="form-control bValidate" key="required" ng-disabled="modifyType=='update'"
										ng-options="merchant.merchantCode as merchant.name for merchant in virtualMerchantMap"
										ng-model="selectedCostServiceMerchant.merchantCode">
										<option value="">请选择虚拟合作商</option>
									</select>
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-3 control-label text-right">是否启用</label>
							<div class="col-md-8">
								<div class="radio-list">
									<label class="radio-inline"> <input
										ng-model="selectedCostServiceMerchant.isValid" type="radio"    class="bValidate"   key="required"  name="isvalid"
										value="1" ng-selected="selectedCostServiceMerchant.isValid==1">
										启用
									</label> <label class="radio-inline"> <input 
										ng-model="selectedCostServiceMerchant.isValid" type="radio"  name="isvalid"
										value="0" ng-selected="selectedAccountingRule.isValid==0">
										停用
									</label>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-danger" data-dismiss="modal">
						<i class="fa fa-times"></i>关闭
					</button>
					<button type="button" class="btn btn-primary"
						ng-click="modifyCostServiceMerchant();">
						<i class="fa fa-check"></i>保存
					</button>
				</div>
			</div>
		</div>
	</div>
		

</div>
	<!-- END CONTENT -->

<!-- END CONTAINER -->

<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->



</body>
<!-- END BODY -->
</html>
<script src="manageView/assets/scripts/public.js" type="text/javascript"></script>
<script>

// setTimeout(function(){
// 	var tablesOption = datatableOption;
// var table1 = $('#table_1');
// var tb1 = table1.DataTable(tablesOption);
// }, 3000);

</script>